classdef LinearDiscriminantAnalysis < Classifier & Modelable
    %LINEARDISCRIMINANTANALYSIS Summary of this class goes here
    %   Detailed explanation goes here
    
    properties
    end
    
    methods
        function [ this ] = LinearDiscriminantAnalysis( name )
            this.setName('lda');
        end
    end
    
    methods
        function [  ] = build( this, X, Y )
            this.model.X1 = X;
            this.model.Y1 = Y;
        end
        
        function [ result ] = apply( this, X, Y )
            [result.Y_hat, zErr] = linear_classify(X, this.model.X1, this.model.Y1);
            result.Y_out = 1 - zErr;
        end
    end
end

